// @ts-ignore
/* eslint-disable */
import request from '@/request'

/** addNotice POST /api/notice/add */
export async function addNoticeUsingPost(
  body: API.NoticeAddRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseLong_>('/api/notice/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** deleteNotice POST /api/notice/delete */
export async function deleteNoticeUsingPost(
  body: API.DeleteRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/notice/delete', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** getNoticeById GET /api/notice/get */
export async function getNoticeByIdUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getNoticeByIdUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseNotice_>('/api/notice/get', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** listNotice POST /api/notice/list */
export async function listNoticeUsingPost(
  body: API.NoticeQueryRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseListNotice_>('/api/notice/list', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** listNoticeByPage POST /api/notice/list/page */
export async function listNoticeByPageUsingPost(
  body: API.NoticeQueryRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageNotice_>('/api/notice/list/page', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** updateNotice POST /api/notice/update */
export async function updateNoticeUsingPost(
  body: API.NoticeUpdateRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/notice/update', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}
